import React from 'react'
import { Toast, NavBar } from 'react-vant';
import { useNavigate } from 'react-router-dom';
import { ArrowLeft } from '@react-vant/icons';

export default function Navbars(props: any) {
    //console.log(props);


    let { title, isBack } = props

    let navigate = useNavigate()

    return (
        <div>
            <NavBar
                title={title}
                leftText={isBack ? <span><ArrowLeft /></span> : null}
                onClickLeft={() => {
                    /* 返回上一页 */
                    navigate(-1)
                }}
            />
        </div>
    )
}
